<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增员工工资')" />
    <th:block th:include="include :: datetimepicker-css" />

</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-salary-add" th:object="${sysuser}">
            <input name="userId" th:filed="*{userId}" type="hidden">
            <div class="form-group">
                <div class="col-sm-8">
                    <input name="sName" class="form-control" th:value="*{userId}" type="hidden" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required" for="sMoney">员工工资：</label>
                <div class="col-sm-8">
                    <input id="sMoney" name="sMoney" class="form-control"  type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required" for="sDate">工资日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input id="sDate" name="sDate" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    </div>
                </div>
            </div>
            <div class="form-group">    
<!--                <label class="col-sm-3 control-label">下发状态：</label>-->
                <div class="col-sm-8">
                    <div class="radio-box"style="display: none">
                        <select name="sStatus" th:with="type=${@dict.getType('salary_status')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                            </option>
                        </select>
                    </div>

                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/salary"
        $("#form-salary-add").validate({
            focusCleanup: true
        });
        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-salary-add').serialize());
            }
        }

        $("input[name='sDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>